YAHOO.dasBrowser.genome.request.doAtTheBeginningOfLoading = function(){
	displayLoadingWindow(YAHOO.dasBrowser.yuiContainer.loadingWindow);

	if (YAHOO.dasBrowser.genome.karyotypeStructure.test) {
		YAHOO.dasBrowser.genome.karyotypeStructure.setTestValues();
	}
	if(YAHOO.dasBrowser.genome.karyotypeStructure.karyotype.karyotypeConf.useCustomChromosomeWidthPx){
		YAHOO.dasBrowser.genome.karyotypeStructure.karyotype.calculateKaryotypeChromosomeWidthPx();
	}
	
	YAHOO.dasBrowser.genome.panel.setPanelListeners('annotationListView', true);
	YAHOO.dasBrowser.genome.panel.setPanelListeners('sequenceView');
	YAHOO.dasBrowser.genome.panel.setPanelListeners('zoomView', true);
	YAHOO.dasBrowser.genome.panel.setPanelListeners('bandView', true);
	YAHOO.dasBrowser.genome.panel.setPanelListeners('chromosomeView', true);
	YAHOO.dasBrowser.genome.panel.setPanelListeners('karyotypeView', true);
	YAHOO.dasBrowser.genome.panel.setPanelListeners('copyNumberView', true);
	YAHOO.dasBrowser.genome.panel.setPanelListeners('test', true);
	
	
	YAHOO.dasBrowser.genome.panel.setPanelTitleStyle('annotationListView');
	YAHOO.dasBrowser.genome.panel.setPanelTitleStyle('sequenceView');
	YAHOO.dasBrowser.genome.panel.setPanelTitleStyle('zoomView');
	YAHOO.dasBrowser.genome.panel.setPanelTitleStyle('bandView');
	YAHOO.dasBrowser.genome.panel.setPanelTitleStyle('chromosomeView');
	YAHOO.dasBrowser.genome.panel.setPanelTitleStyle('karyotypeView');
	YAHOO.dasBrowser.genome.panel.setPanelTitleStyle('copyNumberView');
	YAHOO.dasBrowser.genome.panel.setPanelTitleStyle('test');
	
	var zoom = YAHOO.dasBrowser.genome.karyotypeStructure.karyotype.zoomConf.defaultValues;
	if (zoom.length == 3) {
		var selectedChromosome = "chromosome" + zoom[0];
		YAHOO.dasBrowser.genome.karyotypeStructure.karyotype.chromosomeConf.selectedChromosome = selectedChromosome;
	}
}


YAHOO.dasBrowser.genome.panel.setContainers = function(){
	var defaultContainers = YAHOO.dasBrowser.genome.panel.defaultContainers;
	var userContainers = YAHOO.dasBrowser.genome.panel.userContainers;
	var displayContainer = "block";
	var eClientContainer = document.getElementById("clientContainer");
	for (var key in defaultContainers) {
		containerName = defaultContainers[key];
		containerId = key;
		if(userContainers.length > 0){
			displayContainer = "none";
			for (var j = 0; j < userContainers.length; j++) {
				if(userContainers[j] == containerId){
					displayContainer = "block";
					break;
				}
			}
		}
		var html = "<div id='" + containerId + "Container' style='display:" + displayContainer + ";'>";
		html += "<div id='" + containerId + "Style'>";
		html += "<div id='" + containerId + "Display' style='display: inline;'>";
		html += "<span id='" + containerId + "Img'>";
		html += "<img src='img/minus02.gif' class='panelImg'>"
		html += "</span style='display: inline;'>";
		html += containerName;
		html += "</div>";
		//html += "<form style='display: inline;' name='" + containerId + "Form' action='results' method='post' target='_blank'>";
		//html += "<input type='hidden' name='html' id='" + containerId + "FormHtml' value=''>";
		//html += "<input type='submit' onclick='document.getElementById(\'" + containerId + "FormHtml\').value = document.getElementById(\'" + containerId + "').innerHTML' value='Save' class='fontSize10' style='margin-left:3px; background:#f2f2f2; color:#000; border: 1px solid #000; cursor: pointer;'>"
		//html += "</form>";
		html += "</div>";
		html += "<div id='" + containerId + "'></div>";
		html += "</div>";
		eClientContainer.innerHTML += html;
	}
}


